package org.example.server.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.entity.User;

import java.util.List;

@Mapper
public interface UserMapper {


    @Select("SELECT * from `jd-registration`.t_user where user_id=#{userId}")
    User selectById(String userId);

    List<User> selectByHospitalNo(String hospitalNo);

    User selectByMobile(@Param("mobile") String mobile,@Param("hospitalNo") String hospitalNo);

    void insert(User user1);

    void updateUserId(User user1);
    @Select("SELECT user_id from `jd-registration`.t_user where account=#{mobile}")
    String getByMobile(String mobile);
}
